<%-- 
    Document   : departmentsList
    Created on : Oct 17, 2012, 9:15:38 AM
    Author     : DinhThang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>JSP Page</title>
            <link rel="stylesheet" type="text/css" href="../styles/style.css" />
        </head>
        <body            
            <jsp:include page="../includes/incHeader.jsp" flush="false" />
            <h3>Update Roles</h3>
            <h:form>
                <div style="color: red; text-align: center">
                    <h:messages />
                </div>
                <h:inputHidden value="#{usersBean.users.userID}"/>
                <h:inputHidden value="#{usersBean.users.createTime}">
                    <f:convertDateTime type="date" pattern="dd-MM-yyyy" />
                </h:inputHidden>
                <h:inputHidden value="#{usersBean.users.roleID}"/>
                <h:inputHidden value="#{usersBean.users.departmentID}"/>
                <h:inputHidden value="#{usersBean.users.username}"/>
                <h:inputHidden value="#{usersBean.users.firstName}"/>
                <h:inputHidden value="#{usersBean.users.lastName}"/>
                <h:inputHidden value="#{usersBean.users.isEnable}"/>
                <h:panelGrid columns="2" style="margin:0 auto">
                    <h:outputText value="Username :"/>
                    <h:outputText value="#{usersBean.users.username}"/>

                    <h:outputText value="Old Password" />
                    <h:inputSecret id="oldpwd" redisplay="true" size="50" value="#{usersBean.oldPwd}" styleClass="inputbox"/>

                    <h:outputText value="New Password"/>
                    <h:inputSecret id="newPwd" redisplay="true" size="50" value="#{usersBean.newPwd}" styleClass="inputbox"/>

                    <h:outputText value="Confirm Password"/> 
                    <h:inputSecret id="newPwdConfirm" redisplay="true" size="50" value="#{usersBean.newPwdConfirm}" styleClass="inputbox"/>
                    
                    <h:commandLink value="Cancel" action="changePassBack" />
                    <h:commandLink value="Change Password" action="#{usersBean.changePassword}">
                        <f:param name="idParam" value="#{usersBean.users.userID}"/>
                    </h:commandLink>
                </h:panelGrid>
            </h:form>
            <jsp:include page="../includes/incFooter.jsp" flush="false" />
        </body>
    </html>
</f:view>